package com.bm.api.controller;

import com.bm.api.service.LotService;
import com.bm.common.dto.LotDto;
import com.bm.common.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: 赵金帅
 * @Date: 2022/07/19/20:43
 */
@RestController
@RequestMapping("/api/lot/")
@Api(tags = "缘分配对相关操作-赵金帅")
public class Lotcontroller {
    @Resource
    private LotService service;
    @ApiOperation(value = "缘分配对信息添加到数据库")
    @PostMapping("save.do")
    public R save(@RequestBody LotDto dto){
        return service.save(dto);
    }
    @ApiOperation(value = "随机配对一个用户")
    @GetMapping("select.do")
    public R select(@RequestParam long uid){
        return service.select(uid);
    }
}
